<template>
    <div class="pricing_information">
        <div class="findings_audit_contents">
            <div class="column" v-for="(item, index) in logList" :key="index">
                <div class="circle" :style="{ 'background-color': index == 0 ? '#109AFF' : '' }"></div>
                <div v-if="index !== logList.length - 1" class="line"></div>
                <div class="column_top">
                    <div class="adopt_proposal" :style="{ 'color': index == 0 ? '#109AFF' : '' }">{{ item.name
                        }}
                    </div>
                    <div class="adopt_proposals" :style="{ 'color': index == 0 ? '#109AFF' : '' }">{{ item.des
                        }}
                    </div>
                    <div class="danger_date">
                        {{ item.time }}
                    </div>
                </div>
                <div class="danger_name" v-if="item.title">
                    {{ item.title }}
                </div>
                
            </div>
        </div>
    </div>

    <div class="hm-form-title" id="merchant_qualification">商品资质</div>
    <div class="hm-form-mechanism">
        <div class="mechanism_flex">
            <div class="mechanism_divs mechanism_div">
                <div class="titles">备案凭证/行政许可批件：</div>
                <div class="values">
                    <ImageUploadDrags v-model="commoditydetailsData.voucherImage" :limit="5" :format="true"
                        :fileType="['png', 'jpg', 'jpeg', 'pdf']" :isType="false" />
                </div>
            </div>
            <div class="mechanism_divs mechanism_div">
                <div class="titles">其他资质：</div>
                <div class="values">
                    <ImageUploadDrags v-model="commoditydetailsData.otherImage" :limit="5" :format="true"
                        :fileType="['png', 'jpg', 'jpeg', 'pdf']" :isType="false" />
                </div>
            </div>
            <div class="mechanism_divs mechanism_div" v-if="commoditydetailsData.tradeMode == '进口'">
                <div class="titles">进口货物/原材料报关单：</div>
                <div class="values">
                    <ImageUploadDrags v-model="commoditydetailsData.customsDeclarationImage" :limit="5" :format="true"
                        :fileType="['png', 'jpg', 'jpeg', 'pdf']" :isType="false" />
                </div>
            </div>
            <div class="mechanism_divs mechanism_div" v-if="commoditydetailsData.tradeMode == '进口'">
                <div class="titles">进口产品备案材料：</div>
                <div class="values">
                    <ImageUploadDrags v-model="commoditydetailsData.customsInformationImage" :limit="5" :format="true"
                        :fileType="['png', 'jpg', 'jpeg', 'pdf']" :isType="false" />
                </div>
            </div>
            <div class="mechanism_divs mechanism_div" v-if="commoditydetailsData.tradeMode == '进口'">
                <div class="titles">进口产品原材料检验检疫证明：</div>
                <div class="values">
                    <ImageUploadDrags v-model="commoditydetailsData.customsInspectionImage" :limit="5" :format="true"
                        :fileType="['png', 'jpg', 'jpeg', 'pdf']" :isType="false" />
                </div>
            </div>
            <div class="mechanism_divs mechanism_div" v-if="commoditydetailsData.tradeMode == '进口'">
                <div class="titles">检测报告：</div>
                <div class="values">
                    <ImageUploadDrags v-model="commoditydetailsData.customsTestReportImgae" :limit="5" :format="true"
                        :fileType="['png', 'jpg', 'jpeg', 'pdf']" :isType="false" />
                </div>
            </div>
        </div>
    </div>
    <div class="hm-form-title" id="brand_qualification">品牌资质</div>
    <div class="hm-form-mechanism">
        <div class="mechanism_flex">
            <div class="mechanism_divs mechanism_div">
                <div class="titles">品牌商标注册证：</div>
                <div class="values">
                    <ImageUploadDrags v-if="commoditydetailsData.hmBrandVo"
                        v-model="commoditydetailsData.hmBrandVo.brandImage" :limit="5" :format="true"
                        :fileType="['png', 'jpg', 'jpeg', 'pdf']" :isType="false" />
                </div>
            </div>
            <div class="mechanism_divs mechanism_div">
                <div class="titles">商标授权使用证明：</div>
                <div class="values">
                    <ImageUploadDrags v-if="commoditydetailsData.hmBrandVo"
                        v-model="commoditydetailsData.hmBrandVo.usageImage" :limit="5" :format="true"
                        :fileType="['png', 'jpg', 'jpeg', 'pdf']" :isType="false" />
                </div>
            </div>
            <div class="mechanism_div mechanism_divs">
                <div class="titles">使用授权品类：</div>
                <div class="values" v-if="commoditydetailsData.hmBrandVo">{{
                    commoditydetailsData.hmBrandVo.usages }}</div>
            </div>
            <div class="mechanism_divs mechanism_div">
                <div class="titles">店铺销售授权：</div>
                <div class="values">
                    <ImageUploadDrags v-if="commoditydetailsData.hmBrandVo"
                        v-model="commoditydetailsData.hmBrandVo.sellImage" :limit="5" :format="true"
                        :fileType="['png', 'jpg', 'jpeg', 'pdf']" :isType="false" />
                </div>
            </div>
            <div class="mechanism_div mechanism_divs">
                <div class="titles">销售授权品类：</div>
                <div class="values" v-if="commoditydetailsData.hmBrandVo">{{
                    commoditydetailsData.hmBrandVo.sells }}</div>
            </div>
            <div class="mechanism_divs mechanism_div">
                <div class="titles">其他资质补充：</div>
                <div class="values">
                    <ImageUploadDrags v-if="commoditydetailsData.hmBrandVo"
                        v-model="commoditydetailsData.hmBrandVo.otherImage" :limit="5" :format="true"
                        :fileType="['png', 'jpg', 'jpeg', 'pdf']" :isType="false" />
                </div>
            </div>
            <div class="mechanism_divs mechanism_div">
                <div class="titles">联名款或其他授权文件：</div>
                <div class="values">
                    <ImageUploadDrags v-if="commoditydetailsData.hmBrandVo"
                        v-model="commoditydetailsData.hmBrandVo.jointlyImage" :limit="5" :format="true"
                        :fileType="['png', 'jpg', 'jpeg', 'pdf']" :isType="false" />
                </div>
            </div>
        </div>
    </div>

</template>
<script setup name="Qualifications" lang="ts">
defineProps({
    logList: {
        type: Array as () => Array<any>,
        default: ''
    },
    commoditydetailsData: {
        type: Object,
        default: ''
    },
});
</script>
<style lang="scss" scoped>
.pricing_information {
    .findings_audit_contents {
        // height: 80px;
        width: 80%;
        display: flex;
        margin-top: 10px;
        justify-content: space-between;
        flex-wrap: wrap;

        .column {
            width: 100%;
            // display: flex;
            justify-content: space-between;
            align-items: flex-start;
            position: relative;

            .content {
                font-size: 14px;
                color: #AFB6C3;
                position: absolute;
                top: 0px;
                left: 430px;
                margin-left: 10px;

                .content_flex {
                    .content_flex_is {
                        display: flex;
                        align-items: center;
                    }

                    .content_div {
                        margin-right: 10px;
                        line-height: 1;
                    }
                }
            }

            .column_top {
                display: flex;
                height: 18px;
                margin-left: 10px;
                position: absolute;
                top: 0;
                left: 10px;
                align-items: center;
            }

            .circle {
                width: 11px;
                height: 11px;
                border-radius: 50%;
                margin-bottom: 70px;
                margin-top: 3px;
                border: 1px solid #109AFF;
            }

            .line {
                height: calc(100% - 11px);
                position: absolute;
                border-left: 1px solid #0094FF;
                top: 13px;
                left: 5px;
            }

            .adopt_proposal {
                font-size: 14px;
                line-height: 1.4;
            }

            .adopt_proposals {
                font-size: 14px;
                line-height: 1.4;
                margin-left: 10px;
            }

            .danger_name {
                font-size: 14px;
                color: #AFB6C3;
                position: absolute;
                top: 0px;
                left: 430px;
                margin-left: 10px;
            }

            .danger_date {
                font-size: 14px;
                color: #B8BECA;
                margin-left: 10px;
            }

        }

    }
}
.hm-form-title {
    font-size: 16px;
    font-weight: bold;
    color: #1a1b1c;
    margin-bottom: 10px;
}
.mechanism_flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;

    .mechanism_div {
        margin-bottom: 15px;
        width: calc(100% / 3);
        display: flex;
        align-items: center;
        color: #606266;
        font-size: 14px;

        .title {
            font-size: 14px;
            color: #303133;
            width: 130px;
        }

        .value {
            width: calc(100% - 130px);
            word-break: break-all;
        }
    }

    .mechanism_divs {
        width: 100% !important;

        .title_copy {
            width: 80px;
        }

        .value_copy {
            width: calc(100% - 400px);
        }

        .el-textarea {
            width: 100%;
        }

        .buttons {
            margin-left: 20px;
            display: flex;
            align-items: center;

            .buttons_itemleft{
                margin-left: 20px;
                img{
                    width: 16px !important;
                    height: 16px !important;
                }
            }

            .buttons_item {
                width: 92px;
                height: 38px;
                border-radius: 19px;
                border: 1px solid #0094FF;
                font-weight: 400;
                font-size: 16px;
                color: #0094FF;
                text-align: center;
                line-height: 38px;
                display: flex;
                align-items: center;
                justify-content: center;
                cursor: pointer;
                img{
                    width: 14px;
                    margin-right: 10px;
                    height: 14px;
                }
            }
        }


        .titles {
            font-size: 14px;
            color: #303133;
            width: 200px;
        }

        .values {
            width: calc(100% - 200px);
            word-break: break-all;
        }
    }
}
</style>